package VarTest;

public class Homework3 {
    public static void main(String[] args){
        Student stu1 = new Student(110,"张三",'男',185);
        System.out.println("学号："+stu1.getMark());
        System.out.println("姓名："+stu1.getName());
        System.out.println("性别："+stu1.getSex());
        System.out.println("身高："+stu1.getHeight());
        System.out.println("---------------");
        Student stu2 = new Student(120,"李四",'女',165);
        System.out.println("学号："+stu2.getMark());
        System.out.println("姓名："+stu2.getName());
        System.out.println("性别："+stu2.getSex());
        System.out.println("身高："+stu2.getHeight());
    }
}
class Student{
    private int mark;
    private String name;
    private char sex;
    private double height;
    public Student(int mark,String name,char sex,double height){
        this.mark = mark;
        this.name = name;
        this.sex = sex;
        this.height = height;
    }

    public int getMark() {
        return mark;
    }

    public void setMark(int mark) {
        this.mark = mark;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        this.sex = sex;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }
}